<%@ page contentType="text/html; charset:utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="header.jsp">
	<jsp:param name="title" value="管理用户组"/>
</jsp:include>
<table align="center" cellpadding="0" cellspacing="1" class="table_list">
	<caption>用户组管理</caption>
	<tr>
		<th width="5%">groupid</th>
		<th width="30%">名称</th>
		<th width="30%">管理操作</th>
	</tr>
	
	<c:forEach items="${requestScope.groups}" var="group">
	<tr>
		<td class="align_c">${group.key}</td>
		<td style="color:<c:choose><c:when test="${group.key eq 1}">green</c:when><c:otherwise>blue</c:otherwise></c:choose>;">${group.value}</td>
		<td class="align_c">
			<a href="${requestScope.config.site_root}/admin?c=group&a=add&groupid=${group.key}">修改</a> | 
			<a href="javascript:;" onclick="deleteConfirm('${requestScope.config.site_root}/admin?c=group&a=manage&op=delete&groupid=${group.key}')">删除</a>
		</td>
	</tr>
	</c:forEach>
</table>
<jsp:include page="footer.jsp"/>
<script language="javascript">
function deleteConfirm(url) {
	if(window.confirm('确定删除该用户组吗？')) {
		location.href = url;
	}
}
</script>